package com.example.interfaces.controller;

import com.example.infrastructure.common.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试控制器
 */
@RestController
@RequestMapping("/test")
@Tag(name = "测试接口", description = "用于测试系统功能")
public class TestController {

    @GetMapping("/hello")
    @Operation(summary = "Hello测试", description = "测试接口是否正常工作")
    public Result<String> hello() {
        return Result.success("Hello, DDD Examples!");
    }

    @GetMapping("/public")
    @Operation(summary = "公开接口测试", description = "测试无需认证的公开接口")
    public Result<String> publicEndpoint() {
        return Result.success("This is a public endpoint");
    }
}
